package com.cn.lp.jpa.cq;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

/**
 * @author wqr
 * Created by on 2019/8/7
 */
public interface CQConditionPredicate<TFrom> {

    /**
     * 构建jpa的Predicate对象
     * @param root
     * @param query
     * @param cb
     * @return
     */
    Predicate toPredicate(Root<TFrom> root, CriteriaQuery<?> query, CriteriaBuilder cb);

}
